#include "common/hash.h"

uint64_t FNV_1a::Hash(Byte* data, std::size_t len) {
    uint64_t h = c_offsetBasis;
    for (std::size_t i = 0; i < len; ++i) {
      h = h ^ data[i];
      h = h * c_FNVPrime;
    }
    return h;
  }